// 展开/折叠子节点（JavaScript）
function toggleChildren(node) {
    const children = node.nextElementSibling;
    if (children) {
        children.style.display =
            children.style.display === 'none' ? 'block' : 'none';
    }
}
// 节点悬停效果
document.querySelectorAll('.node').forEach(node => {
    node.addEventListener('mouseenter', () => {
        node.style.transform = 'scale(1.05)';
        node.style.zIndex = '10';
    });
    node.addEventListener('mouseleave', () => {
        node.style.transform = 'scale(1)';
        node.style.zIndex = '1';
    });
});
